package com.bamboo.pistorage.domain;


import com.bamboo.model.enums.COSBucketEnum;

import java.io.File;

/**
* @description cos上传成功后返回的数据
* @date 2025/3/26 16:09
* @author chenzh
*/
public class UploadResultEntity<T> {
    private Long dbId;
    /**
     * 存储桶名字
     */
    private COSBucketEnum bucket;
    /**
     * 上传对象在cos的key，用于访问
     */
    private String key;
    private File localFile;
    /**
     * 请求id
     */
    private String requestId;
    /**
     * 额外信息
     */
    private T extra;

    public Long getDbId() {
        return dbId;
    }

    public void setDbId(Long dbId) {
        this.dbId = dbId;
    }

    public COSBucketEnum getBucket() {
        return bucket;
    }

    public void setBucket(COSBucketEnum bucket) {
        this.bucket = bucket;
    }

    public File getLocalFile() {
        return localFile;
    }

    public void setLocalFile(File localFile) {
        this.localFile = localFile;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public T getExtra() {
        return extra;
    }

    public void setExtra(T extra) {
        this.extra = extra;
    }

    @Override
    public String toString() {
        return "UploadResultEntity{" +
                "bucket=" + bucket +
                ", key='" + key + '\'' +
                ", requestId='" + requestId + '\'' +
                ", extra=" + extra +
                '}';
    }
}
